<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../jquery-3.2.1.min.js"></script>
    <script src="js/outOfStock.js"></script>
    <script src="../layui/layui.js"></script>
    <link href="../layui/css/layui.css" rel="stylesheet">
    <link href="css/outOfStock.css" rel="stylesheet">
</head>
<body>
    <div class="layui-container">
        <hr>
        <h1>销售出库</h1>
        <hr>
        <div id="oneDiv" class="layui-row" >
            <div class="layui-col-md3">
                客户   <select id="clientSelect" onchange="changeClient()"></select>
            </div>
            <div class="layui-col-md3">
                销售员  <span id="sallerSpan"></span>
            </div>

            <div class="layui-col-md3">
                订单总额 <span id="amountSpan"></span><br>
            </div>

            <div class="layui-col-md3">
                送货地址 <input type="text" id="address">
            </div>
        </div>
        <hr>
        <div>
            出库物品
            <table class="layui-table">
                <thead>
                <tr><th>商品名称</th><th>厂家</th><th>现有库存</th><th>建议销售价</th><th>出库数量</th></tr>
                </thead>
                <tbody id="commodityData"></tbody>
            </table>
        </div>
        <div class="layui-row">
            <div class="layui-col-md4">
                <a class="layui-btn layui-btn-warm" href="javascript:addCommodity()">添加商品</a>
            </div>
            <div class="layui-col-md4">
                <a class="layui-btn layui-btn-warm" href="javascript:delCommodity()">移除商品</a>
            </div>
            <div class="layui-col-md4">
                <a class="layui-btn layui-btn-warm" href="javascript:outOfStock()">出库</a>
            </div>
        </div>
    </div>

    <!--添加弹出层-->
    <div id="addDiv" class="layui-row" style="display: none" >
        <hr><h3>添加出库商品</h3><hr>
        <div class="layui-col-lg12">
            <table class="layui-table">
                <thead>
                    <tr><th>商品名称</th><th>厂家</th><th>建议销售价</th></tr>
                </thead>
                <tbody id="allCommodityData"></tbody>
            </table>
            <div id="cutPageDiv"></div>
        </div>
        <div class="layui-col-md6">
            <a class="layui-btn layui-btn-warm" href="javascript:add()">添加</a>
        </div>
        <div>
            <fieldset>
                <legend>查询采购信息</legend>
                <div>
                    商品名称 <input type="text" id="name">
                </div><br>
                <div>
                    类别   <select id="typeSelect" onchange="changeType()"></select>
                </div>
                <a class="layui-btn layui-btn-warm" href="javascript:findByItem()">查询</a>
            </fieldset>
        </div>
    </div>

    <!--出库弹出层-->
    <div id="outOfStockDiv" class="layui-row" style="display: none" >
        出库成功
    </div>
</body>
</html>